<?php
	$id=$_GET['id'];
	
	$sttmt = $koneksi->query("select id_produk from stok where id_stok=$id");

	$hasil = $sttmt->fetch(PDO::FETCH_ASSOC);
		
	$sttmt = $koneksi->exec("delete from stok where id_stok = $id");
	
	$url_sukses="utama.php?module=mod_stok&id=$hasil[id_produk]";

	if($sttmt){
		echo "<meta http-equiv='refresh' content='0; url=$url_sukses'>";
		exit;
	}else{
		echo mysql_error();
	}
?>